package com.cat.observer;

/**
 * @author cat
 * @version 2025/5/27 19:04
 * @description
 * @since JDK17
 */

public class Client {
    public static void main(String[] args) {
        // 创建一个主题对象
        SubscriptionSubject subject = new SubscriptionSubject();

        subject.attach(new WeixinUser("jcjc"));
        subject.attach(new WeixinUser("yjyj"));
        subject.attach(new WeixinUser("ynyn"));

        subject.notify("cat又更新了!!!");
    }
}
